package com.wlc.service;

import com.wlc.entity.Product;
import com.wlc.mapper.ProductMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ProductService {
    @Autowired
    private ProductMapper productMapper; // 传统Mybatis Mapper

    public Product getProduct(Integer id) {
        return productMapper.selectById(id); // 使用原生Mybatis方法
    }
}